<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th = "http://www.thymeleaf.org">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">

  <title>更新部门信息页面</title>
  <!-- Bootstrap core CSS -->
  <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

  <!-- Custom styles for this template -->
  <link th:href="@{/css/dashboard.css}" rel="stylesheet">
  <style type="text/css">
    /* Chart.js */

    @-webkit-keyframes chartjs-render-animation {
      from {
        opacity: 0.99
      }
      to {
        opacity: 1
      }
    }

    @keyframes chartjs-render-animation {
      from {
        opacity: 0.99
      }
      to {
        opacity: 1
      }
    }

    .chartjs-render-monitor {
      -webkit-animation: chartjs-render-animation 0.001s;
      animation: chartjs-render-animation 0.001s;
    }
  </style>
</head>

<body>
<div th:replace="~{commons/commons::Topbar}"></div>

<div class="container-fluid">
  <div class="row">
    <!--侧边栏-->
    <div th:replace="~{commons/commons::Sidebar(active='employList.html')}"></div>

    <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">

      <form class="form-horizontal" th:action="@{/updateDep}" method="post">
        <input type="hidden" th:value="${department.getId()}" name="id">
        <div class="form-group">
          <label>部门名称</label>
          <input th:value="${department.getDepartmentName()}" type="text" name="departmentName" class="form-control" placeholder="XX部" >
        </div>
        <div class="form-group">
          <label>部门负责人</label>
          <select class="form-control" name="chargeMan" th:if="${not #lists.isEmpty(employeeList)}">
            <option th:each="emp:${employeeList}" th:selected="${emp.getLastName() == department.getChargeMan()}" th:text="${emp.getLastName()}" th:value="${emp.getLastName()}"></option>
          </select>
          <select class="form-control" name="chargeMan" th:if="${#lists.isEmpty(employeeList)}">
              <option th:selected="${department.getChargeMan()}" th:text="${department.getChargeMan()}" th:value="${department.getChargeMan()}"></option>
          </select>
        </div>
        <div class="form-group">
          <label>部门创建时间</label>
          <input th:value="${#dates.format(department.getCreate_time(),'yyyy-MM-dd')}" type="date" name="create_time" class="form-control" placeholder="yyyy-MM-dd">
        </div>
        <div class="form-group">
          <button type="submit" class="btn btn-primary">修改</button>
        </div>
      </form>

    </main>
  </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="asserts/js/popper.min.js"></script>
<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>



</body>

</html>
